<?php
/**
 * Created by PhpStorm.
 * User: Wenda Fang
 * Date: 14-1-4
 * Time: 下午1:11
 * Desc: This file is the header of all pages including haading and navigation
 */
include('database.class.php');
//Get the value of category by GET
    if(!empty($_GET['category'])) {
        $categoryId = $_GET['category'];
    } else {
        $categoryId = 4;
    }
    $mysqli = new database();
    $result = $mysqli->get_category($categoryId);
    $categoryName = $result->fetch_row();
	$categoryName = $categoryName[0];
?>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="学霸网致力于整合浩瀚繁杂的网络学习资源，以最简洁的方式呈现给大家">
    <meta name="author" content="湖北大学琴园科技创新团队">
    <link rel="shortcut icon" href="">
    <title>学霸导航---<?php echo($categoryName);?></title>

    <!-- Bootstrap -->
    <link rel="stylesheet" href="http://cdn.bootcss.com/twitter-bootstrap/3.0.3/css/bootstrap.min.css">

    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
    <script src="http://cdn.bootcss.com/html5shiv/3.7.0/html5shiv.min.js"></script>
    <script src="http://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->

    <!-- Custom styles for this template -->
    <link href="../style/css/carousel.css" rel="stylesheet">
    <link href="../style/css/site.min.css" rel="stylesheet">
</head>
<!-- NAVBAR
================================================== -->
<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation" style="border-radius:0px">
    <div class="container">
        <div class="navbar-header">
            <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
        </div>
        <div class="navbar-collapse collapse">
            <ul class="nav navbar-nav navbar-right">
                <li class="active"><a href="index.php">首页</a></li>
                <li><a href="index.php?category=1">计算机</a></li>
                <li><a href="index.php?category=2">英语</a></li>
                <li><a href="index.php?category=3">教育考试</a></li>
                <li><a href="more.html">更多</a></li>
            </ul>
        </div>
    </div>
</nav>
<body>
<div class="jumbotron">
    <div class="container">
        <h1 style="font-size:50px;">学霸导航</h1>
        <p class="lead">简明、直观、实用的网络学习资源导航<br />让学习从此变得如此简单</p>
        <form role="search">
            <div class="form-group">
                <input type="text" class="input-sm" placeholder="输入你想搜索的类别">
                <button type="submit" class="btn btn-primary">搜索</button>
            </div>
        </form>
        <p class="website-amount"></p>
    </div>
</div>


